package com.example.day2.db;

import androidx.room.Dao;
import androidx.room.Delete;
import androidx.room.Insert;
import androidx.room.OnConflictStrategy;
import androidx.room.Query;

import com.example.day2.entity.UserAccount;

@Dao
public abstract class UserAccountDao {
    @Insert(onConflict = OnConflictStrategy.REPLACE)
    public abstract void add(UserAccount account);
    @Delete
    public abstract void delete(UserAccount account);
    @Query("select * from "+UserAccount.TABLE_NAME+" where username=:username ")
    public abstract UserAccount getQuery(String username);
}
